{include app:admin.inc.header}
<!--tmpl-resource-->

<style>
    body{
        background-color:#fff;
    }
</style>
<div class="container-fluid content-body">
    <div class="main" style="padding:0">


        <!-- main content start-->
        <section  id="right-section">
            <!-- start of inner-frame -->
            <div class="inner-iframe">


                <div class="inner-container">
                    <form class="form-inline search-form" role="form">
                        <input type="hidden" name="pagesize" value="{$pagesize}">
                        <!-- search form start -->
                        <!--tmpl-search-->
                        
                        <nav class="inline-form clearfix bgcf">
                            <div class="r">
                                <div class="css-select-group">
                                    <div class="css-select">
                                        <div class="chosen">
                                            <span></span>
                                            <i class="angle-down"></i>
                                            <input type="hidden" name="select_mix_option1" value="{$search_arr[select_mix_option1]}">
                                        </div>
                                        <ul style="z-index:999;">

                                            <li data-value="product_no">货号</li>
                                            <li data-value="type_name">分类</li>
                                            <li data-value="product_name">品名</li>
                                            <li data-value="factory_name">厂家</li>
                                            <li data-value="brand_name">牌号</li>

                                        </ul>
                                    </div>
                                   <input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="关键词" name="select_mix_option_value1" value="{$search_arr[select_mix_option_value1]}">
                                </div>
                                <div class="form-group">
                                    <input type="hidden" name="order" value="{$order}">
                                    <button type="submit" class="btnlg mb">搜索</button>
                                </div>
                            </div>
                        </nav>
                        <!-- search form end -->
                    </form>
                    <form id="J_List_Form" name="product_list">
                        <div class="table-responsive">
                            <table id="J_ListTable" class="table  table-hover  table-striped">

                                <thead>
                                <tr>
                                    <th width="20"><input type="checkbox" disabled="" class="icheck check-all"/></th>


                                    <th>产品货号</th>
                                    <th>分类</th>
                                    <th>品名</th>
                                    <th>厂家</th>
                                    <th>牌号</th>
                                    <th>数量({$pro_unit})</th>
                                    <th>冻结数量({$pro_unit})</th>
                                    <th>销售价(元/{$pro_unit})</th>
                                    <th>会员销售价(元/{$pro_unit})</th>
                                    <th>成本价(元/{$pro_unit})</th>
                                    <th>货品规格({$pro_std})</th>

                                </tr>
                                </thead>
                                <tbody>
                                {if empty($items)}
                                <tr>
                                    <td style="text-align:center;" colspan="8" class="empty-table-td">{$emptyRecord}
                                    </td>
                                </tr>
                                {/if}
                                {loop $items $value}

                                <tr data-id="{$value[id]}">
                                    <td class="icheck-td">
                                        {if $value[quantity]==0||($value[quantity]-$value[freeze_quantity])==0}

                                        <input type="checkbox" class="icheck" disabled="" name="ids[]" value="{$value[id]}"/>
                                        {else}
                                        <input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/>

                                        {/if}
                                        <textarea style="display: none;" class="product_info"><?php echo json_encode($value); ?></textarea>

                                    </td>

                                    <td>{$value[product_no]}</td>
                                    <td>{$value[type_name]}</td>
                                    <td>{$value[product_name]}</td>
                                    <td>{$value[factory_name]}</td>
                                    <td>{$value[brand_name]}</td>

                                    {if $value[quantity]==0||($value[quantity]-$value[freeze_quantity])==0}

                                      <td><?php echo bcsub($value[quantity],$value[freeze_quantity],3);?></td>
                                    {else}
                                      <td><?php echo bcsub($value[quantity],$value[freeze_quantity],3);?></td>

                                    {/if}
                                    <td>{$value[freeze_quantity]}</td>

                                    <td {if $value[member_sales_price]!=''} style="text-decoration: line-through" {/if}>{$value[orgin_sales_price]}</td>
                                    {if $value[member_sales_price]!=''}
                                      <td>{$value[member_sales_price]}</td>
                                    {else}
                                      <td>--</td>
                                    {/if}

                                    <td>{$value[cost_price]}</td>
                                    <td>{$value[pkg_size]}</td>



                                </tr>
                                {/loop}


                            </table>

                        </div>

                        <!--<div style="text-align: center;">
                            <button type="submit" class="btn btn-primary" id="select_products">确定</button>
                            <a href="javascript:void(0)" class="btn btn-default" onclick="parent.layer.closeAll();">取消</a>
                        </div>-->
                    </form>
                    <div class="text-right">
                        {$pagemenu}
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->


<!-- pagescript -->
<script type="text/javascript">
    seajs.use("admin/productindex", function (parameter) {

        /**--tmpl-templatejavascript--**/

        <!--tmpl-templatejavascript-->
        parameter.detailUrl = "{$detail_url}";
        parameter.doDeleteUrl = "{$do_delete_url}";
        parameter.editUrl = "{$do_edit_url}";
        parameter.doOffShelfUrl = "{url admin/product/do_offShelf}";

        parameter.image_search_url = "{$image_search_url}";
        parameter.image_list_url = "{$image_list_url}";

        parameter.init();
    });
</script>


<script id="assocpage" type="text/html">
    <div class="text-right">
        <ul class="pagination blog-pagination">
            <li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li>
            {[loop pages page]}

            <li {[if curr== page]}class="active" {[
            /if]}><a class="assoc-page" data-page="{[page]}" href="javascript:void(0)">{[page]}</a></li>

            {[/loop]}
            <li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li>
        </ul>
    </div>
</script>
</body>
</html>
